package loghub

import (
	"gddgame.cc/galaxy/common/feature/phantom"
	"gddgame.cc/galaxy/utils/def"
)

type Aliyun struct {
	Config *phantom.Config
}

func init() {
	_ = phantom.RegisterPlatform("aliyun", func(config *phantom.Config) (phantom.Platform, error) {
		platform := &Aliyun{
			Config: config,
		}
		// todo 验证参数
		return platform, nil
	})
}

func (platform *Aliyun) Recorder() def.Recorder {
	return NewRecorder(platform.Config.EndPoint, platform.Config.AccessKeyId, platform.Config.AccessKeySecret)
}
